'use client'
import { GeneratorClient } from "@/components/generator-client"
import { fetchWithJwtToken } from "@/lib/utils";
import { useEffect, useState } from "react"

export default function GeneratorPage() {
  const [user, setUser] = useState<{ id: number; username: string } | null>(null);
  useEffect(() => {
    fetchWithJwtToken('/api/auth/getUser').then(data => setUser(data));
  }, []);
  return <GeneratorClient user={user} />
}
